-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add webhooks modal example #173
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -77,3 +77,116 @@ When delivering events to your webhook endpoint we follow these guidelines | |||
- If your endpoint returns a 5xx status code in less than 5 seconds we retry up to 2 times with exponential backoff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some cases where a Modal web endpoint might not spin up and ACK in less than 5 seconds. To avoid that, you can put keep_warm
on the stub.function
so you don't hit cold boots, but then you lose autoscaling. You can also reduce the chance of by putting less work in the path of the request -- e.g. defining a separate stub.function
to handle a run
and using Function.spawn
to launch it as a background task, which means you can get to the ACK faster.
I'll include that in my example, so no need to put it in here, just wanted to raise the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments -- the code changes are the only ones I'd consider blocking, the rest are just nice-to-haves.
No description provided.